<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
${aier_doctype}
<html <s:property value="aier_html_xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="${aier_content_type}" />
<meta name="keywords" content="${aier_keyworks}" />
<meta name="description" content="${aier_description}" />
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}ui.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="stylesheet" href="${aier_css_url}proxy/si.css" />

<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/hh/ui.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script> 
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
</head>
<script type="text/javascript">        
$(document).ready(function(){            
	$("#classinfo").jqGrid({                
		url:'${aier_url}${aier_urijs}class_manage_load',                
		datatype:"json",                
		mtype:'GET',                
		colNames:['班级','创建时间','管理教师','操作','cid'],                
		colModel:[                    
		{name:'cname',index:'cname',width:120,align:'center'},                    
		{name:'cdate',index:'cdate',width:180,align:'center'},                    
		{name:'tnames',index:'tnames',width:200, sortable:false,align:'center'},
		{name:'option',index:'cid',width:60,align:'center', sortable:false},
		{name:'cid',index:'cid',hidden:true}    
		],
		//autowidth:true,
		jsonReader: {
			root:"classes",
			page: "page",
			total: "page_count",
			records : "count",
			repeatitems: false
		},
		pager: jQuery('#classpage'),
		prmNames : {page:"page",sort: "sort"},
		rowNum: 10,
		//rowList: [10, 20, 30],
		sortname: 'cdate',
		hidegrid: false,
		sortorder: 'asc',
		viewrecords: true,
		caption: '班级管理',
		gridComplete:function(){
			var ids=jQuery("#classinfo").jqGrid('getDataIDs');
			for(var i=0; i<ids.length; i++){
				var id=ids[i];   
				o = "<a href='javascript:;' style='color:#f60' onclick='Option(" + id + ")'>操作</a>"; 
				jQuery("#classinfo").jqGrid('setRowData', ids[i], { option: o });
			}
		}
	}).navGrid("#classpage", { edit: false, add: false, del: false, search: false });
});

	function Option(id){
		alert(jQuery("#classinfo").jqGrid('getRowData', id).cid);
	}
</script>

<body>
	<div id="tabs">
		<ul>
			<li><a href="#tabs-1">基本信息</a></li>
			<li><a href="#tabs-2">班级管理</a></li>
			<li><a href="#tabs-3">职务管理</a></li>
			<li><a href="#tabs-4">职工管理</a></li>
		</ul>
		<!-- 学校基本信息 -->
		<div id="tabs-1" style="height: 500px;">
			<div class="d_content">
				<div style="width: 500px;height: 100px;">
					<div class="d_label">学校名称</div>
					<div class="d_lab_con">超级幼儿园</div>
					<div class="d_label">联系地址</div>
					<div class="d_lab_con">巫山路101号</div>
					<div class="d_label">教师数</div>
					<div class="d_lab_con">100</div>
					<div class="d_label">学生数</div>
					<div class="d_lab_con">322</div>
				</div>
				<div
					style="width: 500px;height: 100px;margin-top: -100px;margin-left: 300px;">
					<div class="d_label">联系电话</div>
					<div class="d_lab_con">0519-12345678</div>
					<div class="d_label">网址</div>
					<div class="d_lab_con">http://www.google.com</div>
					<div class="d_label">超级管理员</div>
					<div class="d_lab_con">AA000001</div>
					<div class="d_label">创建时间</div>
					<div class="d_lab_con">2012年9月12日</div>
				</div>
				<button id="but_revise"
					style="width:100px;height: 25px;margin-top: 100px;margin-left: 500px;">修改</button>
				<!-- 学校信息弹出层 -->
				<div id="dialog" title="学校信息"
					style="background-color: lightblue;width: 500px;height: 300px;">
					<div style="height: 30px;width: 100%;"></div>
					<div style="margin-top: 10px;">
						<div class="d_scnleft">
							<div class="d_scname">
								<label for="txt_scName">学校名称</label>
							</div>
							<div class="d_sctext">
								<input type="text" id="txt_scName">
							</div>
						</div>
						<div class="d_scnright">
							<div class="d_scname">
								<label for="txt_scName">联系电话</label>
							</div>
							<div class="d_sctext">
								<input type="text" id="txt_scName">
							</div>
						</div>
						<div class="d_scnleft">
							<div class="d_scname">
								<label for="txt_scName">联系地址</label>
							</div>
							<div class="d_sctext">
								<input type="text" id="txt_scName">
							</div>
						</div>
						<div class="d_scnright">
							<div class="d_scname">
								<label for="txt_scName">网址</label>
							</div>
							<div class="d_sctext">
								<input type="text" id="txt_scName">
							</div>
						</div>
						<div class="d_scnleft">
							<div class="d_scname">
								<label for="txt_scName">超级管理员</label>
							</div>
							<div class="d_sctext">
								<input type="text" id="txt_scName">
							</div>
						</div>
						<div class="d_scnright">
							<div class="d_scname">
								<label for="txt_scName">初始密码</label>
							</div>
							<div class="d_sctext">
								<input type="text" id="txt_scName">
							</div>
						</div>
						<div style="margin-left: 250px;margin-top: 50px;">
							<button>确定修改</button>
							<button>删除该校</button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 班级管理 -->
		<div id="tabs-2" style="height: 500px;">
			<div>
				<table id="classinfo"></table>
				<div id="classpage"></div>
			</div>
		</div>
		<!-- 职务管理 -->
		<div id="tabs-3" style="height: 500px;">
			<div></div>
		</div>
		<!-- 职工管理 -->
		<div id="tabs-4" style="height: 500px;">
			<div class="d_content">
				<div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="txt_account">账号:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_account">
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="sel_gender">性别:</label>
						</div>
						<div class="d_gender">
							<select id="sel_gender"><option>不限</option>
								<option>男</option>
								<option>女</option>
							</select>
						</div>
					</div>
				</div>
				<div style="margin-top: -80px;margin-left: 210px;">
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="txt_sName">职工姓名:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_sName">
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="sel_classes">班级:</label>
						</div>
						<div class="d_classes">
							<select id="sel_classes"><option>不限</option>
								<option>小1班</option>
								<option>大一班</option>
							</select>
						</div>
					</div>
				</div>
				<div style="margin-top: -80px;margin-left: 400px;">
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="sel_position">职务:</label>
						</div>
						<div class="d_position">
							<select id="sel_position"><option>不限</option>
								<option>校长</option>
								<option>副校长</option>
							</select>
						</div>
					</div>
				</div>
				<div class="b_query">查询</div>
			</div>

			<button id="b_addStaff">添加职工</button>
			<!-- 职工信息弹出层 -->
			<div id="d_staffInfo" title="职工信息"
				style="background-color: lightblue;width: 660px;height: 400px;">
				<div>
					<div style="height: 30px;width: 100%;"></div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="txt_addName">姓名:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_addName">
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="sel_position">考勤卡号:</label>
						</div>
						<div class="sel_region">
							<select id="sel_position">
								<option>请选择</option>
								<option>AB</option>
								<option>AA</option>
							</select>
						</div>
						<div class="d_card">
							<input type="text" id="txt_card">
						</div>
						<div class="d_cardsInfo">
							<span>该卡可用</span>
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label>性别:</label>
						</div>
						<div class="d_male">
							<input name="gender" type="radio" id="r_male" checked="checked"><label
								for="r_male">男</label>
						</div>
						<div class="d_female">
							<input name="gender" type="radio" id="r_female"><label
								for="r_male">女</label>
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label>身份证编号:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_idcard">
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label>联系邮箱:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_email">
						</div>
					</div>
				</div>
				<div style="margin-left: 340px;margin-top: -200px;">
					<div class="d_scnOut">
						<div class="d_scname">
							<label>账号:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_addAccount">
						</div>
						<div class="d_acInfo">该账号不存在,密码初始化为"888888"</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="sel_addPosition">职务:</label>
						</div>
						<div class="d_position">
							<select id="sel_addPosition"><option>请选择</option>
								<option>校长</option>
								<option>副校长</option>
							</select>
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="txt_birthday">出生日期:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_birthday">
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="sel_addClasses">管理班级:</label>
						</div>
						<div class="d_classes">
							<select id="sel_addClasses">
								<option>无</option>
								<option>小1班</option>
								<option>大2班</option>
							</select>
						</div>
					</div>
					<div class="d_scnOut">
						<div class="d_scname">
							<label for="txt_addTel">联系电话:</label>
						</div>
						<div class="d_sctext">
							<input type="text" id="txt_addTel">
						</div>
					</div>
				</div>
				<div class="d_scnOut">
					<div class="d_scname">
						<label>联系地址:</label>
					</div>
					<div class="sel_region">
						<select>
							<option>请选择</option>
							<option>江苏</option>
						</select> <select>
							<option>请选择</option>
							<option>常州</option>
						</select> <select>
							<option>请选择</option>
							<option>武进</option>
						</select> <select>
							<option>请选择</option>
							<option>湖塘</option>
						</select>
					</div>
					<div class="d_address">
						<input type="text" id="txt_addAddress" class="txt_scname">
					</div>
				</div>
				<div class="b_addStaff">添加</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	$("#tabs").tabs();

	// 弹出层
	$.fx.speeds._default = 1000;
	$(function() {
		$("#dialog").dialog({
			autoOpen : false,
			show : "blind",
			//hide : "explode",
			width : "500",
			height : "300"
		});

		$("#but_revise").click(function() {
			$("#dialog").dialog("open");
			return false;
		});

		$("#d_staffInfo").dialog({
			autoOpen : false,
			show : "blind",
			//hide : "explode",
			width : "800",
			height : "500"
		});

		$("#b_addStaff").click(function() {
			$("#d_staffInfo").dialog("open");
			return false;
		});
	});
</script>
</html>